<?php
class Lion_View_Helper_AboutCountry extends Zend_Controller_Action_Helper_Abstract
{
    private $_view;
	public function setView($view) {
		$this->_view = $view;
	}
	
	public function aboutCountry($category)
    {  
    	$model_aboutcountry = new Aboutcountry(); 
    	$nationalparks_arr = $model_aboutcountry->listByCategory($category);
    	//$rec_arr = $model_aboutcountry->listPageContentAboutCountry();    	
    	
		foreach ($nationalparks_arr as $entry) :
			$description_en = substr($entry['description_en'], 0, 70) . "...";
			$description_ru = substr($entry['description_ru'], 0, 70) . "...";
			$sess = new Zend_Session_Namespace('locale');
	        $curr_lang = $sess->current_lang;
	        if($curr_lang != '')
	        {
	            $lang = $curr_lang;
	        } else {
	    	    $lang = 'en';
		    }
		    		
?>
		<div class="m-offers"><a href="/aboutcountry/view/page_id/<?php echo $entry['page_id']; ?>"><?php echo $this->_view->translate('%' . $entry['title'], 'home'); ?></a><br/>
		<?php 
			if($lang == "en")
			{
				echo $description_en;
			} else if($lang == "ru") {
				echo $description_ru;
			}
		 ?>	
		<!--<img src="/images/np-2-002.jpg" alt="" />--></div>
<?php 
		endforeach; 
?>	
<?php	  	
	}
}		
?>